package com.base.dataStructure.recurrence;

/**
 * @Author: hdhao
 * @Create: 2023/3/28 - 20:35
 * @Version: v1.0
 */
//反向打印字符串
public class ReversePrintString {

    public static void main(String[] args) {
        f(0,"abcd");
    }
    public static void f(int n,String str){
        if (n == str.length()){
            return;
        }
        f(n+1,str);
        System.out.println(str.charAt(n));
    }
}
